1. Field of the Invention
The present invention relates to a method for testing power switches using a logic gate tree, and more particularly, to a method for testing embedded power switches of an integrated circuit using a logic gate tree.
2. Description of the Prior Art
As related technology keeps improving, integrated circuits become more powerful and smaller, and lower power consumption becomes a basic requirement of the integrated circuits correspondingly. Therefore, ways to control or decrease leakage current inside the integrated circuit is of key importance.
Please refer to FIG. 1, which shows an integrated circuit 100 of the prior art utilizing MOS transistors M1, M2, M3 as power switches to control current flows i1, i2, i3 inside the integrated circuit 100. Because the MOS transistors M1, M2, M3 are capable of switching large amounts of power, the MOS transistors M1, M2, M3 are installed between a power source 140 and corresponding functional circuits 110, 120, 130 of the integrated circuit 100. When the functional circuit 110, 120, 130 is working, the MOS transistor M1, M2, M3 is turned on to provide a path for the current flow i1, i2, i3 from the power source 140 to the functional circuit 110, 120, 130. On the other hand, when the functional circuit 110, 120, 130 is idle, the MOS transistor M1, M2, M3 is turned off to block the current flow i1, i2, i3 from the power source 140 in order to decrease leakage current in the functional circuit 110, 120, 130.
In the prior art, the method for verifying function of the MOS transistors M1, M2, M3 is performed by measuring leakage current at the output nodes B of the MOS transistors M1, M2, M3 one by one. For example, the MOS transistor M1 is turned on and then off (the other MOS transistors M2, M3 are turned off) to measure leakage current at the output node B of the MOS transistor M1. Thereafter, the MOS transistor M2 is turned on and then off (the other MOS transistors M1, M3 are turned off) to measure leakage current at the output node B of the MOS transistor M2. Finally, the MOS transistor M3 is turned on and then off (the other MOS transistors M1, M2 are turned off) to measure leakage current at the output node B of the MOS transistor M3. Therefore, each leakage current of the MOS transistors M1, M2, M3 can be detected to determine whether the MOS transistors M1, M2, M3 work functionally.
However, measuring leakage current level is time consuming, and sometimes the leakage current may be too small to be sensed such that it may cause an error judgment. Moreover, the prior art must measure each leakage current of the MOS transistors one at a time, which is inefficient.